/**
 * Bestpay.com.cn Inc.
 * Copyright (c) 2011-2019 All Rights Reserved.
 */
package com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.factory.abstractFactory;

import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.factory.AbstractPizzaStore;
import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.factory.PizzaTypeEnum;
import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.pizza.Pizza;
import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.pizza.pizzaimpl.CaliforniaCheesePizza;
import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.pizza.pizzaimpl.ChicagoStyleCheesePizza;

import javax.validation.constraints.NotNull;

/**
 * 加利福尼亚 pizza 工厂
 *
 * @author zhaorongzhang
 * @version CaliforniaStylePizzaStore.java, v 0.1 2019/12/29 2:02 下午 zhaorongzhang Exp $$
 */
public class CaliforniaStylePizzaStore extends AbstractPizzaStore {

    @Override
    protected Pizza createPizza(@NotNull String type) {
        if (PizzaTypeEnum.CHEESE.getCode().equals(type)) {
            return new CaliforniaCheesePizza();
        }
        return null;
    }

}